package main

import (
	"fmt"
	"math/rand"
	"strconv"
)

func main() {
	pChan := make(chan Person, 10)
	for i := 1; i <= 10; i++ {
		var rnd = rand.Intn(100)
		pChan <- Person{Name: "员工" + strconv.Itoa(rnd), Age: byte(rnd), Address: "地址" + strconv.Itoa(rnd)}
	}

	for i := 1; i <= 10; i++ {
		tmp := <-pChan
		fmt.Println(tmp)
	}
}

type Person struct {
	Name    string
	Age     byte
	Address string
}
